package com.ganzalang.gmall.designchain.service.impl;

import com.ganzalang.gmall.designchain.service.VacationHandler;

/**
 * @description:
 * @author: Ganzalang
 * @Date 2021/5/7 14:04
 */
public abstract class AbstractVacationHandler implements VacationHandler {

    private VacationHandler nextHandler;

    public VacationHandler getNextHandler() {
        return this.nextHandler;
    }

    public void setNextHandler(VacationHandler nextHandler) {
        this.nextHandler = nextHandler;
    }

    @Override
    public void handle(Integer day) {
        handleApply(day);
        if (nextHandler != null) {
            nextHandler.handle(day);
        }
    }
}
